﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Hydrogen.MathExt.Expression.Functions
{
    internal class FunctionArcCos:FunctionBase
    {
        public override double Evaluate(params double[] args)
        {
            var v = GetArg(args);
            if (v < -1 || 1 < v)
                throw new ArgumentException($"ArcCos 的参数不在定义域内：{v}");
            return Math.Acos(v);
        }
    }
}
